/*
 * CppExtensions.cpp
 *
 *  Created on: 2009-06-16
 *      Author: malem303
 */

#include "CppExtensions.h"
#include "BitManipulation.h"
#include "../Utils/Logging.h"

#include <alloca.h>
#include <stdlib.h>
int __cxa_guard_acquire(__guard *g)
{
	return !*(char *)(g);
}

void __cxa_guard_release (__guard *g)
{
	*(char *)g = 1;
}

void __cxa_guard_abort (__guard *)
{

}
void __cxa_pure_virtual(void)
{
}

void* operator new(size_t size)
{
	return newOp(size);
}

void* operator new(size_t size, void* memory)
{
	return reallocOp(size, memory);
}

void* operator new[](size_t size)
{
	return newOp(size);
}

void* operator new[](size_t size, void* memory)
{
	return reallocOp(size, memory);
}

void operator delete(void* memory)
{
	delOp(memory);
}

void operator delete[](void* memory)
{
	delOp(memory);
}


